﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Trigger.aspx.cs" Inherits="AjaxStudy.Trigger" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
    </div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div>
                <asp:Button ID="Button1" runat="server" Text="异步回送" OnClick="Button1_Click" />&nbsp;&nbsp;
                <asp:Button ID="Button2" runat="server" Text="整页回送" OnClick="Button2_Click" /> 
                <asp:Button ID="Button4" runat="server" Text="未指定trigger的控件，将使用异步方式" 
                    onclick="Button4_Click" /><br />
                <br />
                <asp:Label ID="Label1" runat="server" Text="当前时间" Font-Bold="True" Font-Size="Large"></asp:Label></div>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="Button1" />
            <asp:PostBackTrigger ControlID="Button2" />
            <asp:AsyncPostBackTrigger ControlID="Button5" />
        </Triggers>
    </asp:UpdatePanel>
    <asp:Button ID="Button3" runat="server" Text="updatepannel外的控件将使用同步方式" onclick="Button3_Click" />
    <asp:Button ID="Button5" runat="server" Text="Button" onclick="Button5_Click" />
    </form>
</body>
</html>
